﻿using System.Collections.Generic;
using Dsl.Ped.Framework.Helpers;

namespace Dsl.Ped.Framework.Extensions
{
    /// <summary>
    /// Extension methods for the enumerables
    /// </summary>
    public static class EnumerableExtension
    {
        /// <summary>
        /// Check the enumerable collection is null or empty
        /// </summary>
        /// <typeparam name="T">Type of the colleciton</typeparam>
        /// <param name="enumerable">Collection we want to check</param>
        /// <returns>True if the given enumerable is null or empty, False otherwise</returns>
        public static bool IsNullOrEmpty<T>(this IEnumerable<T> enumerable)
        {
            return EnumerableHelper.IsNullOrEmpty(enumerable);
        }
    }
}
